// 订单模块 这个模块中有自己的reducer action state
const initState = {
    list: ['apple', 'banana', 'pear']
}

const orderReducer = (state=initState, action) => {
    switch (action.type) {
        case 'add':
            console.log(123, action);
            // 新增订单内容
            let arr = [...state.list];
            arr.push(action.payload);
            return {
                ...state,
                list: arr
            }
    
        default:
            return state
    }
}

export default orderReducer